package cn.gistone.visualeditor.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Document(collection="picture")
@ApiModel
@AllArgsConstructor
@NoArgsConstructor
public class Picture {
    @Id
    @ApiModelProperty("图片id")
    private String id;

    @ApiModelProperty(value = "图片路径",required = true)
    private String imageUrl;

    @ApiModelProperty(value = "图片名字",required = true)
    private String imageName;

    @ApiModelProperty(value = "图片类型",required = true,notes = "1:背景图,2:特效图")
    private Integer type;

    public Picture(String imageUrl, String imageName, Integer type) {
        this.imageUrl = imageUrl;
        this.imageName = imageName;
        this.type = type;
    }
}
